Skip to content

fix: remove conflicting inline tailwind classes from package docs#2230

Closed
iiio2 wants to merge 3 commits intonpmx-dev:mainfrom
iiio2:fix/remove-conflicting-inline-tailwind-classes
Closed

fix: remove conflicting inline tailwind classes from package docs#2230
iiio2 wants to merge 3 commits intonpmx-dev:mainfrom
iiio2:fix/remove-conflicting-inline-tailwind-classes

Conversation

@iiio2
Copy link
Copy Markdown
Contributor

@iiio2 iiio2 commented Mar 23, 2026

The TOC section count (e.g. (102)) appears bold in production but normal in development due to conflicting Tailwind utility classes between inline HTML and the CSS rule.

Cause: The tag had inline font-semibold competing with .toc-content > ul > li > a's font-medium, and Tailwind's CSS ordering differs between dev and production builds.

Fix: Removed inline utility classes from the tag in render.ts, letting the existing CSS rule handle styling so font-normal on the (102) span always wins.

Now in development:

dev-formal

In production:

in-production

Now in Production:

https://npmxdev-git-fork-iiio2-fix-remove-conflicting-inlin-3f1bac-npmx.vercel.app/package-docs/vue/v/3.5.30

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Mar 23, 2026 5:05pm
npmx.dev Ready Ready Preview, Comment Mar 23, 2026 5:05pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Mar 23, 2026 5:05pm

Request Review

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 969c9dd4-4794-406a-a3fb-ba75cfeecb37

📥 Commits

Reviewing files that changed from the base of the PR and between 7f18129 and 042a605.

📒 Files selected for processing (1)
  • server/utils/docs/render.ts
✅ Files skipped from review due to trivial changes (1)
  • server/utils/docs/render.ts

📝 Walkthrough

Walkthrough

The renderToc function in server/utils/docs/render.ts was changed to alter the CSS classes applied to kind-level TOC anchor links: font-semibold and text-fg-muted were removed while hover:text-fg and other attributes (including href="#section-${kind}" and the visible label with count) remain unchanged. The HTML structure and link targets were not modified.

Suggested labels

front

Suggested reviewers

  • serhalp
  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description directly addresses the changeset by explaining the Tailwind CSS class conflict causing visual inconsistencies between development and production environments, and describes the specific fix applied.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ghostdevv
Copy link
Copy Markdown
Contributor

I tried to fix the removal of the hover style by adding it back, but then it doesn't make the title stand out since it's no longer semi bold. Then I realised that it seems that in production it's working correctly? I'll close this for now, but please re-open if I'm wrong? There is caching of the generated docs which makes it harder to figure out sometimes 🫠

image

@ghostdevv ghostdevv closed this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants